/* @file logger.h
 * @brief This file contains the declaration of the Logger class.
 *
 * This file provides the declaration of the Logger class, which is used to
 * loggering base class. The class definition includes a constructor and
 * some member functions.
 *
 * @author haibo.yang
 * @date 2024-02-28
 */
#pragma once

#include <string>
#include "rclcpp/rclcpp.hpp"
#include "rclcpp/logger.hpp"
#include <agv_msgs/msg/agv_event.hpp>

#define USE_ROS_CONSOLE

namespace record {

#ifdef USE_ROS_CONSOLE
 
#define DEBUG(...)  RCLCPP_DEBUG_STREAM(rclcpp::get_logger("record"), __VA_ARGS__)
#define INFO(...)   RCLCPP_INFO_STREAM(rclcpp::get_logger("record"), __VA_ARGS__)
#define WARN(...)   RCLCPP_WARN_STREAM(rclcpp::get_logger("record"), __VA_ARGS__)
#define ERROR(...)  RCLCPP_ERROR_STREAM(rclcpp::get_logger("record"), __VA_ARGS__)

#define ASSERT(condition)   assert(condition)
#else

#define DEBUG(...)  std::cout << "[Debug]: " << __VA_ARGS__ << std::endl
#define INFO(...)   std::cout << "[Info]: " << __VA_ARGS__ << std::endl
#define WARN(...)   std::cout << "[Warn]: " << __VA_ARGS__ << std::endl
#define ERROR(...)  std::cout << "[Error]: " << __VA_ARGS__ << std::endl

#define ASSERT(condition)   assert(condition)
#endif
}